﻿@model SettingModel

<div class="layui-col-md12">
    <div class="layui-card">
        <div class="layui-card-body">
            <div class="layui-form" lay-filter="">
                <div class="layui-form-item">
                    <u-label asp-for="Name" />
                    <div class="layui-input-inline">
                        <u-editor asp-for="Name" />
                    </div>
                </div>
                <div class="layui-form-item">
                    <u-label asp-for="Value" />
                    <div class="layui-input-inline">
                        <u-editor asp-for="Value" />
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button style="display:none"  class="layui-btn"  id="set_system_submit_btn" lay-submit lay-filter="set_system_submit_btn">确认保存</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<script>
    layui.use(['index'], function () {
        var $ = layui.$
            , form = layui.form;
        form.on('submit(set_system_submit_btn)', function (obj) {
          var field = obj.field;
            $.post('@Url.Action("SettingAdd")', field, function (rep) {
                if (rep.success == 1) {
                    layer.msg('保存成功');
                }
            });
            return false;
        });
        $('.layui-btn.layuiadmin-btn-tags').on('click', function () {
            var type = $(this).data('type');
            active[type] ? active[type].call(this) : '';
        });
    });
</script>